﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SLogo.Helper
{
    /// <summary>
    /// 提供数值处理的帮助
    /// </summary>
    class NumberHelper
    {
        /// <summary>
        /// 检查一个浮点数是否为正数并且小数部分为0并且不是太大
        /// </summary>
        /// <param name="number">要检查的浮点数</param>
        /// <returns>若是则为真</returns>
        public static bool CheckInteger(double number)
        {
            return !(number.ToString().Contains(".") || number.ToString().Contains("E") || number < 0);
        }
    }
}
